<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="/static/js/jquery-3.7.1.min.js"></script>
</head>
<body>
    <div id='title'>

    </div>
    <div id='content'>

    </div>    
    <script>

        $.ajax({
            url: '/proxy?url=https://hceb.edu.cn/xwzx/mtjm.htm',
            success: function(data) {
                // 对返回的数据做初步处理，例如提取标题和内容
                var totalNews = $(data).find('span.p_t').text().match(/\d+/)[0];
                var newsList = $(data).find('div.m_new1 li');
                var maxInt = Math.ceil(totalNews / newsList.length)-1;

                for(let i=maxInt;i>0;i--){
                    let nextURL = '/proxy?url=https://hceb.edu.cn/xwzx/mtjm/'+i+'.htm';
                    $.ajax({
                        url: nextURL,
                        success: function(data) {  
                            console.log('成功访问:',nextURL)  
                            newsList.add($(data).find('div.m_new1 li'));
                        } 
                    });            
                }

                console.log(newsList);
            }
        });
    </script>
</body>
</html>